Repository navigation
Conversation
1 task
Byron
force-pushed
the
gix-backend
branch
4 times, most recently
from
October 7, 2026 13:25
594e7dd to
105114d
Compare
Byron
pushed a commit
that referenced
this pull request
Oct 7, 2026
PR #2274's Python 3.12 CI jobs spent 57m 25s in Windows `pytest` versus 5m 2s on Ubuntu, with 85,777 and 82,683 `Git.execute` launches respectively. A local profile of the file-handle and recursive submodule regressions spent about 65 of 77 seconds executing Git, including 44 seconds in repository construction. Repeated process startup makes the separate metadata probes expensive. Query reference format, object format, bare status and the absolute common directory in one `git rev-parse` call on the CLI construction path. Keep the path last and split only the three fixed scalar fields so embedded newlines remain intact. Git still computes every value. Supported Gix discovery keeps its native metadata and existing CLI format-validation query, with unchanged native launch ceilings and fallbacks. The focused selection drops from 2,447 to 2,009 launches: three saved for each of 146 repository opens. Three paired Windows measurements of 20 opens each reduce the median from 300.74 ms to 221.18 ms per open, with matching metadata and 11 versus eight launches. Add `--durations=30` to CI so future slow tests are visible, and record the profiling evidence and reproduction requirements in `doc/gix-backend.md`. Cover both object formats, both reference formats, bare and non-bare repos, spaces and embedded newlines. The eight applicable Windows cases fail before the fix and pass afterward; all 16 cases pass on Ubuntu WSL. The optional Windows Gix selection reproduces the same 17 failures on the original and patched sources. Document the demonstrated path-formatting and undecodable `commondir` differences under `GIX-14`, distinguishing them from Windows test assumptions. Keep these bugs open pending compatible upstream behavior. Validation: the full Windows CLI suite passes with 1,662 passed, 60 skipped, nine expected failures, two unexpected passes and 40 passing subtests. It records 77,732 launches in 3,715.16s. The initial baseline records 86,032 in 3,990.28s; its only two failures pass on unchanged code after restoring CI's `core.autocrlf=true` and placing `pytest`'s temporary directory outside a Git checkout. The overlapping full runs are not a controlled elapsed-time comparison. Repository-wide Ruff lint/format, all pinned pre-commit hooks, `mypy` (47 files), `basedpyright` (zero errors or warnings), the Sphinx HTML build and `git diff --check` pass.
Byron
pushed a commit
that referenced
this pull request
Oct 8, 2026
PR #2274's Python 3.12 CI jobs spent 57m 25s in Windows `pytest` versus 5m 2s on Ubuntu, with 85,777 and 82,683 `Git.execute` launches respectively. A local profile of the file-handle and recursive submodule regressions spent about 65 of 77 seconds executing Git, including 44 seconds in repository construction. Repeated process startup makes the separate metadata probes expensive. Query reference format, object format, bare status and the absolute common directory in one `git rev-parse` call on the CLI construction path. Keep the path last and split only the three fixed scalar fields so embedded newlines remain intact. Git still computes every value. Supported Gix discovery keeps its native metadata and existing CLI format-validation query, with unchanged native launch ceilings and fallbacks. The focused selection drops from 2,447 to 2,009 launches: three saved for each of 146 repository opens. Three paired Windows measurements of 20 opens each reduce the median from 300.74 ms to 221.18 ms per open, with matching metadata and 11 versus eight launches. Add `--durations=30` to CI so future slow tests are visible, and record the profiling evidence and reproduction requirements in `doc/gix-backend.md`. Cover both object formats, both reference formats, bare and non-bare repos, spaces and embedded newlines. The eight applicable Windows cases fail before the fix and pass afterward; all 16 cases pass on Ubuntu WSL. The optional Windows Gix selection reproduces the same 17 failures on the original and patched sources. Document the demonstrated path-formatting and undecodable `commondir` differences under `GIX-14`, distinguishing them from Windows test assumptions. Keep these bugs open pending compatible upstream behavior. Validation: the full Windows CLI suite passes with 1,662 passed, 60 skipped, nine expected failures, two unexpected passes and 40 passing subtests. It records 77,732 launches in 3,715.16s. The initial baseline records 86,032 in 3,990.28s; its only two failures pass on unchanged code after restoring CI's `core.autocrlf=true` and placing `pytest`'s temporary directory outside a Git checkout. The overlapping full runs are not a controlled elapsed-time comparison. Repository-wide Ruff lint/format, all pinned pre-commit hooks, `mypy` (47 files), `basedpyright` (zero errors or warnings), the Sphinx HTML build and `git diff --check` pass.
Byron
pushed a commit
that referenced
this pull request
Oct 8, 2026
PR #2274's Python 3.12 CI jobs spent 57m 25s in Windows `pytest` versus 5m 2s on Ubuntu, with 85,777 and 82,683 `Git.execute` launches respectively. A local profile of the file-handle and recursive submodule regressions spent about 65 of 77 seconds executing Git, including 44 seconds in repository construction. Repeated process startup makes the separate metadata probes expensive. Query reference format, object format, bare status and the absolute common directory in one `git rev-parse` call on the CLI construction path. Keep the path last and split only the three fixed scalar fields so embedded newlines remain intact. Git still computes every value. Supported Gix discovery keeps its native metadata and existing CLI format-validation query, with unchanged native launch ceilings and fallbacks. The focused selection drops from 2,447 to 2,009 launches: three saved for each of 146 repository opens. Three paired Windows measurements of 20 opens each reduce the median from 300.74 ms to 221.18 ms per open, with matching metadata and 11 versus eight launches. Add `--durations=30` to CI so future slow tests are visible, and record the profiling evidence and reproduction requirements in `doc/gix-backend.md`. Cover both object formats, both reference formats, bare and non-bare repos, spaces and embedded newlines. The eight applicable Windows cases fail before the fix and pass afterward; all 16 cases pass on Ubuntu WSL. The optional Windows Gix selection reproduces the same 17 failures on the original and patched sources. Document the demonstrated path-formatting and undecodable `commondir` differences under `GIX-14`, distinguishing them from Windows test assumptions. Keep these bugs open pending compatible upstream behavior. Validation: the full Windows CLI suite passes with 1,662 passed, 60 skipped, nine expected failures, two unexpected passes and 40 passing subtests. It records 77,732 launches in 3,715.16s. The initial baseline records 86,032 in 3,990.28s; its only two failures pass on unchanged code after restoring CI's `core.autocrlf=true` and placing `pytest`'s temporary directory outside a Git checkout. The overlapping full runs are not a controlled elapsed-time comparison. Repository-wide Ruff lint/format, all pinned pre-commit hooks, `mypy` (47 files), `basedpyright` (zero errors or warnings), the Sphinx HTML build and `git diff --check` pass.
Byron
force-pushed
the
gix-backend
branch
4 times, most recently
from
October 8, 2026 07:14
af1de6a to
c3a2832
Compare
Byron
pushed a commit
that referenced
this pull request
Oct 9, 2026
PR #2274's Python 3.12 CI jobs spent 57m 25s in Windows `pytest` versus 5m 2s on Ubuntu, with 85,777 and 82,683 `Git.execute` launches respectively. A local profile of the file-handle and recursive submodule regressions spent about 65 of 77 seconds executing Git, including 44 seconds in repository construction. Repeated process startup makes the separate metadata probes expensive. Query reference format, object format, bare status and the absolute common directory in one `git rev-parse` call on the CLI construction path. Keep the path last and split only the three fixed scalar fields so embedded newlines remain intact. Git still computes every value. Supported Gix discovery keeps its native metadata and existing CLI format-validation query, with unchanged native launch ceilings and fallbacks. The focused selection drops from 2,447 to 2,009 launches: three saved for each of 146 repository opens. Three paired Windows measurements of 20 opens each reduce the median from 300.74 ms to 221.18 ms per open, with matching metadata and 11 versus eight launches. Add `--durations=30` to CI so future slow tests are visible, and record the profiling evidence and reproduction requirements in `doc/gix-backend.md`. Cover both object formats, both reference formats, bare and non-bare repos, spaces and embedded newlines. The eight applicable Windows cases fail before the fix and pass afterward; all 16 cases pass on Ubuntu WSL. The optional Windows Gix selection reproduces the same 17 failures on the original and patched sources. Document the demonstrated path-formatting and undecodable `commondir` differences under `GIX-14`, distinguishing them from Windows test assumptions. Keep these bugs open pending compatible upstream behavior. Validation: the full Windows CLI suite passes with 1,662 passed, 60 skipped, nine expected failures, two unexpected passes and 40 passing subtests. It records 77,732 launches in 3,715.16s. The initial baseline records 86,032 in 3,990.28s; its only two failures pass on unchanged code after restoring CI's `core.autocrlf=true` and placing `pytest`'s temporary directory outside a Git checkout. The overlapping full runs are not a controlled elapsed-time comparison. Repository-wide Ruff lint/format, all pinned pre-commit hooks, `mypy` (47 files), `basedpyright` (zero errors or warnings), the Sphinx HTML build and `git diff --check` pass.
Byron
force-pushed
the
gix-backend
branch
4 times, most recently
from
October 9, 2026 08:01
75ebc93 to
6881712
Compare
Byron
pushed a commit
that referenced
this pull request
Oct 9, 2026
The Windows Python 3.14 job for PR #2274 failed in `TestSubmodule.test_base_rw` when forced module-only removal called `rmtree`: Windows reported `WinError 32` for `git/ext/gitdb`. The legacy test retains that checkout's `Repo` through `csm.repo` and starts its persistent `cat-file` process while reading parent commits. Closing only the fresh handle created by `Submodule.remove()` cannot release this caller-owned process. Close the retained test-owned parent before deleting its checkout. Keep strict removal and all existing happy-path assertions, and remove the obsolete commented-out skip that claimed removal ignored this error. The original test predates the PR's base, so record this as a follow-up rather than rewriting shared history. The focused `test_base_rw` passed locally with both CLI and Gix. Relevant pre-commit hooks passed. Hosted Windows validation remains part of the PR CI loop.
Byron
pushed a commit
that referenced
this pull request
Oct 9, 2026
The Windows Python 3.14 job for PR #2274 failed in `TestSubmodule.test_base_rw` when forced module-only removal called `rmtree`: Windows reported `WinError 32` for `git/ext/gitdb`. The legacy test retains that checkout's `Repo` through `csm.repo` and starts its persistent `cat-file` process while reading parent commits. Closing only the fresh handle created by `Submodule.remove()` cannot release this caller-owned process. Close the retained test-owned parent before deleting its checkout. Keep strict removal and all existing happy-path assertions, and remove the obsolete commented-out skip that claimed removal ignored this error. The original test predates the PR's base, so record this as a follow-up rather than rewriting shared history. The focused `test_base_rw` passed locally with both CLI and Gix. Relevant pre-commit hooks passed. Hosted Windows validation remains part of the PR CI loop.
Byron
force-pushed
the
gix-backend
branch
2 times, most recently
from
October 14, 2026 09:31
17a316c to
a6c7dba
Compare
Byron
pushed a commit
that referenced
this pull request
Oct 14, 2026
PR #2274's Python 3.12 CI jobs spent 57m 25s in Windows `pytest` versus 5m 2s on Ubuntu, with 85,777 and 82,683 `Git.execute` launches respectively. A local profile of the file-handle and recursive submodule regressions spent about 65 of 77 seconds executing Git, including 44 seconds in repository construction. Repeated process startup makes the separate metadata probes expensive. Query reference format, object format, bare status and the absolute common directory in one `git rev-parse` call on the CLI construction path. Keep the path last and split only the three fixed scalar fields so embedded newlines remain intact. Git still computes every value. Supported Gix discovery keeps its native metadata and existing CLI format-validation query, with unchanged native launch ceilings and fallbacks. The focused selection drops from 2,447 to 2,009 launches: three saved for each of 146 repository opens. Three paired Windows measurements of 20 opens each reduce the median from 300.74 ms to 221.18 ms per open, with matching metadata and 11 versus eight launches. Add `--durations=30` to CI so future slow tests are visible, and record the profiling evidence and reproduction requirements in `doc/gix-backend.md`. Cover both object formats, both reference formats, bare and non-bare repos, spaces and embedded newlines. The eight applicable Windows cases fail before the fix and pass afterward; all 16 cases pass on Ubuntu WSL. The optional Windows Gix selection reproduces the same 17 failures on the original and patched sources. Document the demonstrated path-formatting and undecodable `commondir` differences under `GIX-14`, distinguishing them from Windows test assumptions. Keep these bugs open pending compatible upstream behavior. Validation: the full Windows CLI suite passes with 1,662 passed, 60 skipped, nine expected failures, two unexpected passes and 40 passing subtests. It records 77,732 launches in 3,715.16s. The initial baseline records 86,032 in 3,990.28s; its only two failures pass on unchanged code after restoring CI's `core.autocrlf=true` and placing `pytest`'s temporary directory outside a Git checkout. The overlapping full runs are not a controlled elapsed-time comparison. Repository-wide Ruff lint/format, all pinned pre-commit hooks, `mypy` (47 files), `basedpyright` (zero errors or warnings), the Sphinx HTML build and `git diff --check` pass.
Byron
pushed a commit
that referenced
this pull request
Oct 14, 2026
The Windows Python 3.14 job for PR #2274 failed in `TestSubmodule.test_base_rw` when forced module-only removal called `rmtree`: Windows reported `WinError 32` for `git/ext/gitdb`. The legacy test retains that checkout's `Repo` through `csm.repo` and starts its persistent `cat-file` process while reading parent commits. Closing only the fresh handle created by `Submodule.remove()` cannot release this caller-owned process. Close the retained test-owned parent before deleting its checkout. Keep strict removal and all existing happy-path assertions, and remove the obsolete commented-out skip that claimed removal ignored this error. The original test predates the PR's base, so record this as a follow-up rather than rewriting shared history. The focused `test_base_rw` passed locally with both CLI and Gix. Relevant pre-commit hooks passed. Hosted Windows validation remains part of the PR CI loop.
Merged
Byron
force-pushed
the
gix-backend
branch
3 times, most recently
from
October 15, 2026 07:38
419181d to
13202ce
Compare
GitPython's Python implementations of repository discovery, configuration, references, object storage and indexes assume storage details that do not hold for SHA-256 objects or reftable references. Delegate these operations to Git 2.52+ and offer GixPython 0.2.0 for supported operations, using the Git CLI as the behavioral baseline. Keep library-managed commands behind argument and stdin validation, suppress implicit hooks, external diff programs, maintenance and lazy fetches where appropriate, and preserve explicit unsafe-operation opt-ins. Support SHA-1 and SHA-256 with files or reftable reference storage. Close owned repository handles before filesystem cleanup and account for Windows and Cygwin path restrictions. The optional `gix` extra selects Gitoxide through supported GixPython APIs. `GIT_PYTHON_BACKEND=cli|gix` makes selection explicit even when both backends are installed. Retain native repository handles and adapt native object, reference, index, graph, configuration, diff and status results where they match Git. Keep CLI fallbacks for missing capabilities and incompatible behavior; record reproductions, affected adapters and upstream requirements in the compatibility ledger in `doc/gix-backend.md`. Native execution never means reimplementing Git semantics in Python. Read declared commit encodings according to Git's first-header and whole-commit conversion behavior, including conversion failure and signature headers. Keep UTF-8 metadata native; use Git's text projection for other encodings and the open Gix header-order compatibility bug. Validate these cases with read-only Bash fixtures and direct Git comparisons. Configuration failure regressions exercise Git's per-mutation locks rather than the removed constructor lock. Breaking API changes follow the storage migration. Remove the Python `GitDB` backend and binary index/tree and raw reflog mutation interfaces. Replace `IndexFile.entries` with immutable `iter_entries()`/`entry()` queries and explicit edits; publish deferred index bytes only after Git validates them. Configuration uses Git's syntax and locking, reflogs expose Git's commit-reflog view, and repository object IDs have format-dependent widths. Remove deprecated exports and implicit environment-variable path expansion. Document the affected APIs, exceptions, hook behavior and replacements in `doc/source/changes.rst`. Move generated repository and filesystem initial states into Bash scripts run through `gix.testtools`. Read-only tests share prepared fixtures; mutation tests copy them by default, with explicit execution only for fixtures that cannot be relocated. Keep generated caches and archives out of version control. Tests require GixPython with either backend: CI runs fixture suites on Python 3.11+ and retains installation/import smoke checks on Python 3.8-3.10. Update the normal, minimum-Git, Alpine and Cygwin environments and the source packaging. Add downstream release checks for Bandit, MLflow, LangChain, SWE-bench and DataHub with both backends. Add a read-only repository benchmark that compares result digests, records native/fallback decisions and actual Git launches, and enforces CLI-process ceilings. Preserve historical measurements and their original revision references as evidence, including superseded results. Make scripted tests portable to Git for Windows. Define literal submodule names inside Bash from simple scenario identifiers, because MSYS expands metacharacters in native arguments and disabling that expansion breaks GixPython's quoted script launcher. Retain Windows directory-symlink types for dangling targets and build trailing-space filenames with Git's `mktree` instead of the Windows-restricted index. Compare escaped log paths and native fixture locations correctly. Keep exact Git-recorded submodule URLs while separately checking path identity, including a portable `/./` regression. Use Git's actual text projection for platform-dependent `iconv` declarations. Alpine's musl recognizes `utf-16-be` while macOS rejects that spelling. Keep Git as the text baseline; independently assert the first codec, raw dates/timezones, and native/fallback decisions. Keep malformed UTF-16 fixtures odd-sized, including the portable `UTF-16BE` spelling, so conversion fails without erasing Git's header delimiters. Assert the raw object size to prevent fixture edits from reintroducing unstable pretty output. Record these platform limitations in `doc/gix-backend.md`. Before the Windows fixture repairs, macOS validation used CPython 3.12.14, Git 2.54.0 and GixPython 0.2.0. The full CLI suite passed 1,745 tests with 151 skips, and the full Gix suite passed 1,845 tests with 51 skips. Both passed 58 subtests and retained one expected failure. CLI ran first. All 14 benchmark result digests and the existing CLI-process ceilings matched; the two-sample smoke run establishes no timing conclusion. Ruff lint/format, mypy, basedpyright, ShellCheck and Sphinx with warnings fatal passed. Hosted CI, other platforms and older interpreters were not run locally. The first Windows fixture repair passed 471 tests and 20 subtests on each backend locally but exposed a native Windows launcher failure in CI. The follow-up removes the `MSYS=noglob` override and preserves all literal-name assertions through scripted initial states. It also fixes Alpine's encoding expectation rather than changing production Git behavior. The focused commit, cleanup, fixture-health and literal-name tests passed 70 tests and 21 subtests per backend locally, CLI first, with one Windows-only skip. Repository pre-commit hooks passed. On `13202ce`, 63 of 64 hosted checks passed, including Alpine and Windows Gix. Windows CLI on Python 3.12 exposed one remaining fixture expectation: direct Git returned `x` instead of an empty message after successful UTF-16 recoding removed every newline. The failure preceded the backend comparison. Force conversion failure for those malformed fixtures and remove the unsupported empty-output assertion while retaining exact Git comparisons. No production behavior changes for this repair. The final commit module passed 40 tests and 21 subtests per backend locally, CLI first, and all hooks for the changed files passed. Hosted verification of that final fixture correction is left to the next CI run. Co-authored-by: GPT-6 Astra <codex@openai.com> Co-authored-by: Codex <codex@openai.com> Co-authored-by: Byron <sebastian.thiel@icloud.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tasks
Created by Codex on behalf of Byron. Byron will review before this is ready to merge.
Summary
Important
This PR will become GitPython 3.3 some weeks before Git 3 is officially released in March.
Users can already test and run their software against this branch. Please report compatibility problems and provide feedback here in this PR.
To try it with Git 2.52 or newer installed:
python -m pip install --upgrade "git+https://github.com/gitpython-developers/GitPython.git@gix-backend"GitPython now delegates repository discovery, configuration, references, reflogs, object storage, tree construction, index operations, and revision parsing to guarded Git commands. The default backend supports SHA-1 and SHA-256 objects with either files or reftable reference storage, without interpreting Git's binary storage formats in Python.
The deprecated
GitDBbackend and API aliases are removed; rawrepo.gitcommand access remains available. The migration notes inchanges.rstdescribe the API changes and differences in Git CLI behavior.Changes
1. Git CLI implementation of the GitPython API surface
The ordinary installation implements the supported GitPython API through guarded
git.cmd.Gitcalls. Git owns repository storage and format handling, including SHA-1/SHA-256 objects and files/reftable references. This removes Python storage-format parsing from the default backend while retaining common documented workflows and rawrepo.gitaccess. Removed low-level APIs have replacements documented in the changelog. The existing context and migration notes below describe safety controls and low-level API changes.2. GixPython implementation for better performance
The optional
GitPython[gix]installation uses the publishedGixPython==0.2.0release on CPython 3.11+. GitPython selects it automatically when thegixmodule is importable; the ordinary installation continues to support Python 3.8+. SetGIT_PYTHON_BACKEND=cliorGIT_PYTHON_BACKEND=gixbefore importing GitPython to select a backend explicitly. To try the native backend:python -m pip install --upgrade "GitPython[gix] @ git+https://github.com/gitpython-developers/GitPython.git@gix-backend"Supported library-managed operations use Gitoxide through GixPython's
gixAPI for object reads/writes, revision and graph queries, tree enumeration and construction, index reads, references and reflogs, commit creation/statistics, tree diffs, status, untracked files, and ignore matching. Unsupported formats and options retain the guarded CLI implementation. In particular, reftable andextensions.compatObjectFormatrepositories currently use Git. Native mutation failures are reported without attempting a second CLI mutation. Private index edits and tag object storage use Git until Gix exposes strict validation; index state in Python consists only of opaque file bytes. Commit/tag reads use structured Gix decoders where compatible; commit text requiring encoding conversion uses Git. Publicrepo.gitcommands retain their CLI behavior.Historical local measurements, using official GixPython 0.1.0 on CPython 3.12.14, macOS arm64, before the 0.2.0 fixture migration:
These are individual local validation runs, not statistical benchmarks or a guarantee for every application. The full suites collect different backend-specific tests; the focused selections overlap. See the backend guide and performance journal for conversion coverage, remaining CLI cases, reproduction details, and the GixPython/Gitoxide follow-up ledger (
GIX-1throughGIX-30). Repository handles are now retained and refreshed through the shared accessor; the historical timings above predate that work.3. Scripted test fixtures and CI
Both backend test suites now require GixPython 0.2.0 for
gix.testtools. Initial repository and filesystem states live in Bash scripts undertests/fixtures. Read-only tests reuse cached output; mutating tests receive independent writable copies. Scripts re-execute only when their contents cannot be copied or relocated correctly, including link/permission cases and private absolute paths. Operations under test remain in Python, and Git CLI behavior defines expectations for both backends. Generated fixture caches and archives are ignored; no generated archives are checked in.Full fixture suites run on Python 3.11+ with Bash and Git 2.52+. Python 3.8–3.10 retain installation/import smoke coverage, including Cygwin's Python 3.9 job. CI installs and imports
gix.testtoolsfor both backend selections, explicitly selects the backend, and prepares Rust and build caches where GixPython must be built from its released source distribution.Historical fixture measurements with GixPython 0.1.0: on the same local coverage-enabled suite, fixture optimizations reduced wall time from 757.85 s (12m38s) to 404.61 s (6m45s): 353.24 s saved, 46.6% less time, about 1.87× faster. CLI fallback decisions decreased from 39,002 to 21,402; these counters do not count every Git subprocess. This is the before/after fixture improvement, separate from the backend comparison above. The changes reduce repeated work in the CI suites; the quoted timings are local measurements, not a hosted GitHub Actions before/after benchmark. No matching pre-optimization full CLI run was recorded.
The branch also adds released downstream compatibility checks for LangChain, MLflow, Bandit, SWE-bench, and DataHub, plus reproducible local test execution and backend-operation reports.
Context
The goal is to support Git's object and reference formats while reducing the attack surface of Python implementations and limiting argument injection and unintended CLI side effects.
git.cmd.Git, existing unsafe option/protocol checks, validated operands, and framed stdin records. Shell execution and option reordering past protective flags are rejected. Persistentcat-filerequests use NUL framing.git hook run. Signing/editor options and custom archive format commands require an unsafe-options opt-in.GitCommandErrorwith Git's status and diagnostics.oldhexsha, precompressed object streams and custom object-output writers,Submodule.rename(), and directRepo.alternatesmutation. Configuration follows Git syntax and no longer subclassesRawConfigParser. Detailed replacements and limitations are in the changelog.The change also updates documentation, format/backend and injection regressions, the minimum-Git CI job, and fuzz harnesses. Obsolete binary-parser, deprecation and timing-only tests have been removed. Happy paths, Python glue failures and representative compatibility regressions remain; the maintained backend benchmark checks parity and CLI budgets. The release announcement above describes the planned release; this PR does not change
VERSIONyet.CI follow-up handles platform path conventions and rejects unsupported index filenames before changing the original index. Submodule updates now close their internally opened repositories, preventing retained log records from keeping Windows checkouts open through Git processes. Cygwin builds the supported Git version in its normal installation layout and verifies detection before installation/import smoke checks.
Migration details and historical validation
The index lifecycle now materializes deferred bytes into private files, verifies that Git retained requested entries, and publishes atomically. Failed ordinary edits preserve pending/published state; hook edits survive failures without advancing HEAD.
IndexFile.entriesis replaced byiter_entries()andentry(). Textual date parsing and final trailer extraction use Git. See the migration notes for removed environment-expansion/error-hiding switches and changed date/trailer behavior.Historical validation at earlier revisions: on macOS with Git 2.54.0, the retained suite passed with 1,767 tests on Gix and 1,672 on CLI, plus focused regressions on both. All five downstream profiles passed on both backends. All 14 benchmark result digests matched and existing Gix CLI ceilings passed; concurrent fast timing samples do not establish a speed change. Lint, typing and documentation checks passed locally. CI follow-up fixes the Bash 3.2 condition on macOS, removes the empty historical Cygwin performance split, makes path and command fixtures respect Windows configuration, closes a test-owned submodule parent before removal, and isolates partial-write failure injection to locked publication. Focused regressions passed locally with both backends. All 64 hosted checks passed on
17a316c, including the complete Windows matrix, Gix on Ubuntu/macOS/Windows, downstream compatibility, backend parity and CLI ceilings, and Cygwin (1,691 passed, 20 skipped, 11 xfailed).Current CI validation
All 64 hosted checks passed for
781c620on October 15, 2026. This includes the complete Windows matrix, Gix on Ubuntu/macOS/Windows, Python 3.8–3.10 installation/import checks, Cygwin smoke coverage, Alpine, the minimum-Git job, all five downstream compatibility profiles, backend parity and CLI-process ceilings, and the configured quality checks.Windows Python 3.12 passed 1,674 CLI tests and 1,772 Gix tests, with 61 passing subtests on each backend. The final fixture correction also passed all 40 commit tests and 21 subtests locally on CLI, then Gix, plus the changed files' pre-commit hooks. Git remains the text baseline: malformed UTF-16 fixtures now force conversion failure, with raw-size assertions, rather than assuming stable output after conversion erases Git's header delimiters. Production behavior is unchanged by that correction.
The measurements in earlier sections remain historical; this CI run does not establish a new timing claim. Python 3.8–3.10 receive smoke coverage rather than the GixPython-dependent fixture suites.